﻿using MiddleMVCTask.BL.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace MiddleMVCTask.HtmlHelpers
{
    public static class HtmlExtensions
    {
        /// <summary>
        /// Extension Method for HtmlHelper,
        /// which represent a welcome message to the end user
        /// </summary>
        public static MvcHtmlString WelcomeHelper(this HtmlHelper htmlHelper,
            string name)
        {
            //declare the html helpers
            var div = new TagBuilder("div");
            var strong = new TagBuilder("strong");
            
            strong.InnerHtml = name;
            div.InnerHtml = "Hello " + strong.ToString();
                     
            return MvcHtmlString.Create(div.ToString());
        }
    }
}